Skip to content

[lldb][NFC][MachO] Clean up LC_THREAD reading code, remove i386 corefile #146480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

jasonmolenda
Copy link
Collaborator

While fixing bugs in the x86_64 LC_THREAD parser in ObjectFileMachO, I noticed that the other LC_THREAD parsers are all less clear than they should be.

To recap, a Mach-O LC_THREAD load command has a byte size for the entire payload. Within the payload, there will be one or more register sets provided. A register set starts with a UInt32 "flavor", the type of register set defined in the system headers, and a UInt32 "count", the number of UInt32 words of memory for this register set. After one register set, there may be additional sets. A parser can skip an unknown register set flavor by using the count field to get to the next register set. When the total byte size of the LC_THREAD load command has been parsed, it is completed.

This patch fixes the riscv/arm/arm64 LC_THREAD parsers to use the total byte size as the exit condition, and to skip past unrecognized register sets, instead of stopping parsing.

Instead of fixing the i386 corefile support, I removed it. The last macOS that supported 32-bit Intel code was macOS 10.14 in 2018. I also removed i386 KDP support, 32-bit intel kernel debugging hasn't been supported for even longer than that.

It would be preferable to do these things separately, but I couldn't bring myself to update the i386 LC_THREAD parser, and it required very few changes to remove this support entirely.

While fixing bugs in the x86_64 LC_THREAD parser in ObjectFileMachO,
I noticed that the other LC_THREAD parsers are all less clear than
they should be.

To recap, a Mach-O LC_THREAD load command has a byte size for the
entire payload.  Within the payload, there will be one or more register
sets provided.  A register set starts with a UInt32 "flavor", the type
of register set defined in the system headers, and a UInt32 "count",
the number of UInt32 words of memory for this register set.  After one
register set, there may be additional sets.  A parser can skip an
unknown register set flavor by using the count field to get to the next
register set.  When the total byte size of the LC_THREAD load command
has been parsed, it is completed.

This patch fixes the riscv/arm/arm64 LC_THREAD parsers to use the total
byte size as the exit condition, and to skip past unrecognized register
sets, instead of stopping parsing.

Instead of fixing the i386 corefile support, I removed it.  The last
macOS that supported 32-bit Intel code was macOS 10.14 in 2018.  I also
removed i386 KDP support, 32-bit intel kernel debugging hasn't been
supported for even longer than that.

It would be preferable to do these things separately, but I couldn't
bring myself to update the i386 LC_THREAD parser, and it required very
few changes to remove this support entirely.
@llvmbot llvmbot added the lldb label Jul 1, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 1, 2025

@llvm/pr-subscribers-lldb

Author: Jason Molenda (jasonmolenda)

Changes

While fixing bugs in the x86_64 LC_THREAD parser in ObjectFileMachO, I noticed that the other LC_THREAD parsers are all less clear than they should be.

To recap, a Mach-O LC_THREAD load command has a byte size for the entire payload. Within the payload, there will be one or more register sets provided. A register set starts with a UInt32 "flavor", the type of register set defined in the system headers, and a UInt32 "count", the number of UInt32 words of memory for this register set. After one register set, there may be additional sets. A parser can skip an unknown register set flavor by using the count field to get to the next register set. When the total byte size of the LC_THREAD load command has been parsed, it is completed.

This patch fixes the riscv/arm/arm64 LC_THREAD parsers to use the total byte size as the exit condition, and to skip past unrecognized register sets, instead of stopping parsing.

Instead of fixing the i386 corefile support, I removed it. The last macOS that supported 32-bit Intel code was macOS 10.14 in 2018. I also removed i386 KDP support, 32-bit intel kernel debugging hasn't been supported for even longer than that.

It would be preferable to do these things separately, but I couldn't bring myself to update the i386 LC_THREAD parser, and it required very few changes to remove this support entirely.


Patch is 54.43 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/146480.diff

11 Files Affected:

  • (modified) lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (+12-175)
  • (modified) lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt (-1)
  • (removed) lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp (-114)
  • (removed) lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.h (-38)
  • (modified) lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp (-5)
  • (modified) lldb/source/Plugins/Process/Utility/CMakeLists.txt (-2)
  • (removed) lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp (-958)
  • (removed) lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h (-208)
  • (removed) lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.cpp (-60)
  • (removed) lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.h (-35)
  • (modified) llvm/utils/gn/secondary/lldb/source/Plugins/Process/Utility/BUILD.gn (-2)
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index 70f954cd5413f..979123802435c 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -11,7 +11,6 @@
 
 #include "Plugins/Process/Utility/RegisterContextDarwin_arm.h"
 #include "Plugins/Process/Utility/RegisterContextDarwin_arm64.h"
-#include "Plugins/Process/Utility/RegisterContextDarwin_i386.h"
 #include "Plugins/Process/Utility/RegisterContextDarwin_riscv32.h"
 #include "Plugins/Process/Utility/RegisterContextDarwin_x86_64.h"
 #include "lldb/Core/Debugger.h"
@@ -81,9 +80,6 @@
 #ifdef CPU_TYPE_ARM64_32
 #undef CPU_TYPE_ARM64_32
 #endif
-#ifdef CPU_TYPE_I386
-#undef CPU_TYPE_I386
-#endif
 #ifdef CPU_TYPE_X86_64
 #undef CPU_TYPE_X86_64
 #endif
@@ -358,122 +354,6 @@ class RegisterContextDarwin_x86_64_Mach : public RegisterContextDarwin_x86_64 {
   }
 };
 
-class RegisterContextDarwin_i386_Mach : public RegisterContextDarwin_i386 {
-public:
-  RegisterContextDarwin_i386_Mach(lldb_private::Thread &thread,
-                                  const DataExtractor &data)
-      : RegisterContextDarwin_i386(thread, 0) {
-    SetRegisterDataFrom_LC_THREAD(data);
-  }
-
-  void InvalidateAllRegisters() override {
-    // Do nothing... registers are always valid...
-  }
-
-  void SetRegisterDataFrom_LC_THREAD(const DataExtractor &data) {
-    lldb::offset_t offset = 0;
-    SetError(GPRRegSet, Read, -1);
-    SetError(FPURegSet, Read, -1);
-    SetError(EXCRegSet, Read, -1);
-    bool done = false;
-
-    while (!done) {
-      int flavor = data.GetU32(&offset);
-      if (flavor == 0)
-        done = true;
-      else {
-        uint32_t i;
-        uint32_t count = data.GetU32(&offset);
-        switch (flavor) {
-        case GPRRegSet:
-          for (i = 0; i < count; ++i)
-            (&gpr.eax)[i] = data.GetU32(&offset);
-          SetError(GPRRegSet, Read, 0);
-          done = true;
-
-          break;
-        case FPURegSet:
-          // TODO: fill in FPU regs....
-          // SetError (FPURegSet, Read, -1);
-          done = true;
-
-          break;
-        case EXCRegSet:
-          exc.trapno = data.GetU32(&offset);
-          exc.err = data.GetU32(&offset);
-          exc.faultvaddr = data.GetU32(&offset);
-          SetError(EXCRegSet, Read, 0);
-          done = true;
-          break;
-        case 7:
-        case 8:
-        case 9:
-          // fancy flavors that encapsulate of the above flavors...
-          break;
-
-        default:
-          done = true;
-          break;
-        }
-      }
-    }
-  }
-
-  static bool Create_LC_THREAD(Thread *thread, Stream &data) {
-    RegisterContextSP reg_ctx_sp(thread->GetRegisterContext());
-    if (reg_ctx_sp) {
-      RegisterContext *reg_ctx = reg_ctx_sp.get();
-
-      data.PutHex32(GPRRegSet); // Flavor
-      data.PutHex32(GPRWordCount);
-      PrintRegisterValue(reg_ctx, "eax", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "ebx", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "ecx", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "edx", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "edi", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "esi", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "ebp", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "esp", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "ss", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "eflags", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "eip", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "cs", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "ds", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "es", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "fs", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "gs", nullptr, 4, data);
-
-      // Write out the EXC registers
-      data.PutHex32(EXCRegSet);
-      data.PutHex32(EXCWordCount);
-      PrintRegisterValue(reg_ctx, "trapno", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "err", nullptr, 4, data);
-      PrintRegisterValue(reg_ctx, "faultvaddr", nullptr, 4, data);
-      return true;
-    }
-    return false;
-  }
-
-protected:
-  int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override { return 0; }
-
-  int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override { return 0; }
-
-  int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override { return 0; }
-
-  int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override {
-    return 0;
-  }
-
-  int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override {
-    return 0;
-  }
-
-  int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override {
-    return 0;
-  }
-};
-
 class RegisterContextDarwin_arm_Mach : public RegisterContextDarwin_arm {
 public:
   RegisterContextDarwin_arm_Mach(lldb_private::Thread &thread,
@@ -491,12 +371,11 @@ class RegisterContextDarwin_arm_Mach : public RegisterContextDarwin_arm {
     SetError(GPRRegSet, Read, -1);
     SetError(FPURegSet, Read, -1);
     SetError(EXCRegSet, Read, -1);
-    bool done = false;
 
-    while (!done) {
+    while (offset < data.GetByteSize()) {
       int flavor = data.GetU32(&offset);
       uint32_t count = data.GetU32(&offset);
-      lldb::offset_t next_thread_state = offset + (count * 4);
+      offset_t next_thread_state = offset + (count * 4);
       switch (flavor) {
       case GPRAltRegSet:
       case GPRRegSet: {
@@ -510,9 +389,7 @@ class RegisterContextDarwin_arm_Mach : public RegisterContextDarwin_arm {
 
           SetError(GPRRegSet, Read, 0);
         }
-      }
-        offset = next_thread_state;
-        break;
+      } break;
 
       case FPURegSet: {
         uint8_t *fpu_reg_buf = (uint8_t *)&fpu.floats;
@@ -522,12 +399,8 @@ class RegisterContextDarwin_arm_Mach : public RegisterContextDarwin_arm {
           offset += fpu_reg_buf_size;
           fpu.fpscr = data.GetU32(&offset);
           SetError(FPURegSet, Read, 0);
-        } else {
-          done = true;
         }
-      }
-        offset = next_thread_state;
-        break;
+      } break;
 
       case EXCRegSet:
         if (count == 3) {
@@ -536,14 +409,11 @@ class RegisterContextDarwin_arm_Mach : public RegisterContextDarwin_arm {
           exc.far = data.GetU32(&offset);
           SetError(EXCRegSet, Read, 0);
         }
-        done = true;
-        offset = next_thread_state;
         break;
 
-      // Unknown register set flavor, stop trying to parse.
       default:
-        done = true;
       }
+      offset = next_thread_state;
     }
   }
 
@@ -626,11 +496,10 @@ class RegisterContextDarwin_arm64_Mach : public RegisterContextDarwin_arm64 {
     SetError(GPRRegSet, Read, -1);
     SetError(FPURegSet, Read, -1);
     SetError(EXCRegSet, Read, -1);
-    bool done = false;
-    while (!done) {
+    while (offset < data.GetByteSize()) {
       int flavor = data.GetU32(&offset);
       uint32_t count = data.GetU32(&offset);
-      lldb::offset_t next_thread_state = offset + (count * 4);
+      offset_t next_thread_state = offset + (count * 4);
       switch (flavor) {
       case GPRRegSet:
         // x0-x29 + fp + lr + sp + pc (== 33 64-bit registers) plus cpsr (1
@@ -645,7 +514,6 @@ class RegisterContextDarwin_arm64_Mach : public RegisterContextDarwin_arm64 {
           gpr.cpsr = data.GetU32(&offset);
           SetError(GPRRegSet, Read, 0);
         }
-        offset = next_thread_state;
         break;
       case FPURegSet: {
         uint8_t *fpu_reg_buf = (uint8_t *)&fpu.v[0];
@@ -654,12 +522,8 @@ class RegisterContextDarwin_arm64_Mach : public RegisterContextDarwin_arm64 {
             data.ExtractBytes(offset, fpu_reg_buf_size, eByteOrderLittle,
                               fpu_reg_buf) == fpu_reg_buf_size) {
           SetError(FPURegSet, Read, 0);
-        } else {
-          done = true;
         }
-      }
-        offset = next_thread_state;
-        break;
+      } break;
       case EXCRegSet:
         if (count == 4) {
           exc.far = data.GetU64(&offset);
@@ -667,12 +531,10 @@ class RegisterContextDarwin_arm64_Mach : public RegisterContextDarwin_arm64 {
           exc.exception = data.GetU32(&offset);
           SetError(EXCRegSet, Read, 0);
         }
-        offset = next_thread_state;
         break;
       default:
-        done = true;
-        break;
       }
+      offset = next_thread_state;
     }
   }
 
@@ -775,11 +637,10 @@ class RegisterContextDarwin_riscv32_Mach
     SetError(FPURegSet, Read, -1);
     SetError(EXCRegSet, Read, -1);
     SetError(CSRRegSet, Read, -1);
-    bool done = false;
-    while (!done) {
+    while (offset < data.GetByteSize()) {
       int flavor = data.GetU32(&offset);
       uint32_t count = data.GetU32(&offset);
-      lldb::offset_t next_thread_state = offset + (count * 4);
+      offset_t next_thread_state = offset + (count * 4);
       switch (flavor) {
       case GPRRegSet:
         // x0-x31 + pc
@@ -789,7 +650,6 @@ class RegisterContextDarwin_riscv32_Mach
           gpr.pc = data.GetU32(&offset);
           SetError(GPRRegSet, Read, 0);
         }
-        offset = next_thread_state;
         break;
       case FPURegSet: {
         // f0-f31 + fcsr
@@ -800,7 +660,6 @@ class RegisterContextDarwin_riscv32_Mach
           SetError(FPURegSet, Read, 0);
         }
       }
-        offset = next_thread_state;
         break;
       case EXCRegSet:
         if (count == 3) {
@@ -809,12 +668,10 @@ class RegisterContextDarwin_riscv32_Mach
           exc.far = data.GetU32(&offset);
           SetError(EXCRegSet, Read, 0);
         }
-        offset = next_thread_state;
         break;
       default:
-        done = true;
-        break;
       }
+      offset = next_thread_state;
     }
   }
 
@@ -5408,16 +5265,6 @@ lldb_private::Address ObjectFileMachO::GetEntryPointAddress() {
               done = true;
             }
             break;
-          case llvm::MachO::CPU_TYPE_I386:
-            if (flavor ==
-                1) // x86_THREAD_STATE32 from mach/i386/thread_status.h
-            {
-              offset += 40; // This is the offset of eip in the GPR thread state
-                            // data structure.
-              start_address = m_data.GetU32(&offset);
-              done = true;
-            }
-            break;
           case llvm::MachO::CPU_TYPE_X86_64:
             if (flavor ==
                 4) // x86_THREAD_STATE64 from mach/i386/thread_status.h
@@ -5897,11 +5744,6 @@ ObjectFileMachO::GetThreadContextAtIndex(uint32_t idx,
             std::make_shared<RegisterContextDarwin_arm_Mach>(thread, data);
         break;
 
-      case llvm::MachO::CPU_TYPE_I386:
-        reg_ctx_sp =
-            std::make_shared<RegisterContextDarwin_i386_Mach>(thread, data);
-        break;
-
       case llvm::MachO::CPU_TYPE_X86_64:
         reg_ctx_sp =
             std::make_shared<RegisterContextDarwin_x86_64_Mach>(thread, data);
@@ -6769,11 +6611,6 @@ bool ObjectFileMachO::SaveCore(const lldb::ProcessSP &process_sp,
                   thread_sp.get(), LC_THREAD_datas[thread_idx]);
               break;
 
-            case llvm::MachO::CPU_TYPE_I386:
-              RegisterContextDarwin_i386_Mach::Create_LC_THREAD(
-                  thread_sp.get(), LC_THREAD_datas[thread_idx]);
-              break;
-
             case llvm::MachO::CPU_TYPE_X86_64:
               RegisterContextDarwin_x86_64_Mach::Create_LC_THREAD(
                   thread_sp.get(), LC_THREAD_datas[thread_idx]);
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt b/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
index ddce25c62046a..f26e14f580cb7 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
@@ -12,7 +12,6 @@ add_lldb_library(lldbPluginProcessMacOSXKernel PLUGIN
   ProcessKDPLog.cpp
   RegisterContextKDP_arm.cpp
   RegisterContextKDP_arm64.cpp
-  RegisterContextKDP_i386.cpp
   RegisterContextKDP_x86_64.cpp
   ThreadKDP.cpp
 
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp
deleted file mode 100644
index 61dfeae6ddf43..0000000000000
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-//===-- RegisterContextKDP_i386.cpp ---------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "RegisterContextKDP_i386.h"
-#include "ProcessKDP.h"
-#include "ThreadKDP.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-RegisterContextKDP_i386::RegisterContextKDP_i386(ThreadKDP &thread,
-                                                 uint32_t concrete_frame_idx)
-    : RegisterContextDarwin_i386(thread, concrete_frame_idx),
-      m_kdp_thread(thread) {}
-
-RegisterContextKDP_i386::~RegisterContextKDP_i386() = default;
-
-int RegisterContextKDP_i386::DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) {
-  ProcessSP process_sp(CalculateProcess());
-  if (process_sp) {
-    Status error;
-    if (static_cast<ProcessKDP *>(process_sp.get())
-            ->GetCommunication()
-            .SendRequestReadRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
-                                      error)) {
-      if (error.Success())
-        return 0;
-    }
-  }
-  return -1;
-}
-
-int RegisterContextKDP_i386::DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) {
-  ProcessSP process_sp(CalculateProcess());
-  if (process_sp) {
-    Status error;
-    if (static_cast<ProcessKDP *>(process_sp.get())
-            ->GetCommunication()
-            .SendRequestReadRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
-                                      error)) {
-      if (error.Success())
-        return 0;
-    }
-  }
-  return -1;
-}
-
-int RegisterContextKDP_i386::DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) {
-  ProcessSP process_sp(CalculateProcess());
-  if (process_sp) {
-    Status error;
-    if (static_cast<ProcessKDP *>(process_sp.get())
-            ->GetCommunication()
-            .SendRequestReadRegisters(tid, EXCRegSet, &exc, sizeof(exc),
-                                      error)) {
-      if (error.Success())
-        return 0;
-    }
-  }
-  return -1;
-}
-
-int RegisterContextKDP_i386::DoWriteGPR(lldb::tid_t tid, int flavor,
-                                        const GPR &gpr) {
-  ProcessSP process_sp(CalculateProcess());
-  if (process_sp) {
-    Status error;
-    if (static_cast<ProcessKDP *>(process_sp.get())
-            ->GetCommunication()
-            .SendRequestWriteRegisters(tid, GPRRegSet, &gpr, sizeof(gpr),
-                                       error)) {
-      if (error.Success())
-        return 0;
-    }
-  }
-  return -1;
-}
-
-int RegisterContextKDP_i386::DoWriteFPU(lldb::tid_t tid, int flavor,
-                                        const FPU &fpu) {
-  ProcessSP process_sp(CalculateProcess());
-  if (process_sp) {
-    Status error;
-    if (static_cast<ProcessKDP *>(process_sp.get())
-            ->GetCommunication()
-            .SendRequestWriteRegisters(tid, FPURegSet, &fpu, sizeof(fpu),
-                                       error)) {
-      if (error.Success())
-        return 0;
-    }
-  }
-  return -1;
-}
-
-int RegisterContextKDP_i386::DoWriteEXC(lldb::tid_t tid, int flavor,
-                                        const EXC &exc) {
-  ProcessSP process_sp(CalculateProcess());
-  if (process_sp) {
-    Status error;
-    if (static_cast<ProcessKDP *>(process_sp.get())
-            ->GetCommunication()
-            .SendRequestWriteRegisters(tid, EXCRegSet, &exc, sizeof(exc),
-                                       error)) {
-      if (error.Success())
-        return 0;
-    }
-  }
-  return -1;
-}
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.h b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.h
deleted file mode 100644
index 04868e96191fd..0000000000000
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//===-- RegisterContextKDP_i386.h -------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_SOURCE_PLUGINS_PROCESS_MACOSX_KERNEL_REGISTERCONTEXTKDP_I386_H
-#define LLDB_SOURCE_PLUGINS_PROCESS_MACOSX_KERNEL_REGISTERCONTEXTKDP_I386_H
-
-#include "Plugins/Process/Utility/RegisterContextDarwin_i386.h"
-
-class ThreadKDP;
-
-class RegisterContextKDP_i386 : public RegisterContextDarwin_i386 {
-public:
-  RegisterContextKDP_i386(ThreadKDP &thread, uint32_t concrete_frame_idx);
-
-  ~RegisterContextKDP_i386() override;
-
-protected:
-  int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override;
-
-  int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override;
-
-  int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override;
-
-  int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override;
-
-  int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override;
-
-  int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override;
-
-  ThreadKDP &m_kdp_thread;
-};
-
-#endif // LLDB_SOURCE_PLUGINS_PROCESS_MACOSX_KERNEL_REGISTERCONTEXTKDP_I386_H
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
index 1349de879c69a..69d4cfdae4ad5 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.cpp
@@ -26,7 +26,6 @@
 #include "ProcessKDPLog.h"
 #include "RegisterContextKDP_arm.h"
 #include "RegisterContextKDP_arm64.h"
-#include "RegisterContextKDP_i386.h"
 #include "RegisterContextKDP_x86_64.h"
 
 #include <memory>
@@ -105,10 +104,6 @@ ThreadKDP::CreateRegisterContextForFrame(StackFrame *frame) {
         reg_ctx_sp = std::make_shared<RegisterContextKDP_arm64>(
             *this, concrete_frame_idx);
         break;
-      case llvm::MachO::CPU_TYPE_I386:
-        reg_ctx_sp = std::make_shared<RegisterContextKDP_i386>(
-            *this, concrete_frame_idx);
-        break;
       case llvm::MachO::CPU_TYPE_X86_64:
         reg_ctx_sp = std::make_shared<RegisterContextKDP_x86_64>(
             *this, concrete_frame_idx);
diff --git a/lldb/source/Plugins/Process/Utility/CMakeLists.txt b/lldb/source/Plugins/Process/Utility/CMakeLists.txt
index 48646b784f931..5d99c22dafe15 100644
--- a/lldb/source/Plugins/Process/Utility/CMakeLists.txt
+++ b/lldb/source/Plugins/Process/Utility/CMakeLists.txt
@@ -22,7 +22,6 @@ add_lldb_library(lldbPluginProcessUtility
   RegisterContext_x86.cpp
   RegisterContextDarwin_arm.cpp
   RegisterContextDarwin_arm64.cpp
-  RegisterContextDarwin_i386.cpp
   RegisterContextDarwin_riscv32.cpp
   RegisterContextDarwin_x86_64.cpp
   RegisterContextDummy.cpp
@@ -35,7 +34,6 @@ add_lldb_library(lldbPluginProcessUtility
   RegisterContextLinux_x86_64.cpp
   RegisterContextLinux_s390x.cpp
   RegisterContextMach_arm.cpp
-  RegisterContextMach_i386.cpp
   RegisterContextMach_x86_64.cpp
   RegisterContextMemory.cpp
   RegisterContextNetBSD_i386.cpp
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
deleted file mode 100644
index 174a5a567d2dd..0000000000000
--- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
+++ /dev/null
@@ -1,958 +0,0 @@
-//===-- RegisterContextDarwin_i386.cpp ------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility...
[truncated]

Copy link

github-actions bot commented Jul 1, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@labath
Copy link
Collaborator

labath commented Jul 1, 2025

Sorry for going off-topic, but what does this say about the support for i386-apple-* as a whole? I find the prospect of dropping that exciting, as I believe that is the only target where eh_ and debug_frame register numbers are different.

@jasonmolenda
Copy link
Collaborator Author

Sorry for going off-topic, but what does this say about the support for i386-apple-* as a whole? I find the prospect of dropping that exciting, as I believe that is the only target where eh_ and debug_frame register numbers are different.

I think we can remove i386-macos support, short of booting a seven year old OS on a machine at least that old, and who knows if everything in C++17 we use is even supported by the compilers back then. I know there are sometimes open source people trying to build & use a modern lldb on older configurations, but I think this would be a tough one to have working at this point. I wouldn't feel bad about any patches removing this support. I'll try to start removing these things as I have time/see an opportunity.

Apple announced that the macOS version being released in a few months (macOS 26) would be the final version that supports Intel machines at all. We'll have a business requirement to keep the 64-bit Intel support for another release cycle or so after that. What open source contributors might be using the llvm.org sources on is a different question, but the entire target support is going to go away before much longer I think.

Copy link
Member

@JDevlieghere JDevlieghere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋

@jasonmolenda jasonmolenda merged commit dfcef35 into llvm:main Jul 2, 2025
7 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 2, 2025

LLVM Buildbot has detected a new failure on builder cross-project-tests-sie-ubuntu running on doug-worker-1a while building lldb,llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/181/builds/22971

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
80.171 [500/8/4840] Building CXX object tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/ValidationEvent.cpp.o
80.184 [499/8/4841] Building CXX object tools/llvm-exegesis/lib/X86/CMakeFiles/LLVMExegesisX86.dir/X86Counter.cpp.o
80.205 [498/8/4842] Building CXX object tools/llvm-exegesis/lib/CMakeFiles/LLVMExegesis.dir/UopsBenchmarkRunner.cpp.o
80.227 [497/8/4843] Building CXX object tools/llvm-extract/CMakeFiles/llvm-extract.dir/llvm-extract.cpp.o
80.247 [496/8/4844] Building CXX object tools/llvm-exegesis/lib/X86/CMakeFiles/LLVMExegesisX86.dir/Target.cpp.o
80.255 [495/8/4845] Building Opts.inc...
80.280 [494/8/4846] Building CXX object tools/llvm-gsymutil/CMakeFiles/llvm-gsymutil.dir/llvm-gsymutil.cpp.o
80.298 [493/8/4847] Linking CXX static library lib/libLLVMExegesis.a
80.302 [492/8/4848] Building CXX object tools/llvm-gsymutil/CMakeFiles/llvm-gsymutil.dir/llvm-gsymutil-driver.cpp.o
80.333 [491/8/4849] Building CXX object tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o
FAILED: tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o 
/opt/ccache/bin/g++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/source/Plugins/ObjectFile/Mach-O -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include -I/usr/include/python3.8 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/tools/lldb/source -isystem /usr/include/libxml2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -MF tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o.d -o tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -c /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_arm_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:415:7: error: expected primary-expression before ‘}’ token
  415 |       }
      |       ^
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_arm64_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:536:7: error: expected primary-expression before ‘}’ token
  536 |       }
      |       ^
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_riscv32_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:672:7: error: expected primary-expression before ‘}’ token
  672 |       }
      |       ^
80.357 [491/7/4850] Linking CXX static library lib/libLLVMExegesisX86.a
80.668 [491/6/4851] Building LLDB Python wrapper
81.164 [491/5/4852] Linking CXX executable bin/llvm-dwarfutil
81.200 [491/4/4853] Linking CXX executable bin/llvm-extract
81.216 [491/3/4854] Linking CXX executable bin/lldb-server
81.225 [491/2/4855] Linking CXX executable bin/llvm-dwp
81.599 [491/1/4856] Linking CXX executable bin/llvm-gsymutil
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 2, 2025

LLVM Buildbot has detected a new failure on builder cross-project-tests-sie-ubuntu-dwarf5 running on doug-worker-1b while building lldb,llvm at step 5 "build-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/163/builds/21994

Here is the relevant piece of the build log for the reference
Step 5 (build-unified-tree) failure: build (failure)
...
124.452 [536/8/4800] Building CXX object tools/llvm-dlang-demangle-fuzzer/CMakeFiles/llvm-dlang-demangle-fuzzer.dir/llvm-dlang-demangle-fuzzer.cpp.o
124.472 [535/8/4801] Linking CXX executable bin/llvm-debuginfod
124.530 [534/8/4802] Building CXX object tools/llvm-dwarfdump/CMakeFiles/llvm-dwarfdump.dir/SectionSizes.cpp.o
124.539 [533/8/4803] Linking CXX executable bin/llvm-dlang-demangle-fuzzer
124.556 [532/8/4804] Linking CXX executable bin/lldb-server
124.559 [531/8/4805] Building CXX object tools/llvm-dwarfdump/CMakeFiles/llvm-dwarfdump.dir/Statistics.cpp.o
124.563 [530/8/4806] Building Options.inc...
124.565 [529/8/4807] Building Opts.inc...
124.568 [528/8/4808] Building CXX object tools/llvm-dwarfdump/CMakeFiles/llvm-dwarfdump.dir/llvm-dwarfdump.cpp.o
124.572 [527/8/4809] Building CXX object tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o
FAILED: tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o 
/opt/ccache/bin/g++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/source/Plugins/ObjectFile/Mach-O -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/include -I/usr/include/python3.10 -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/llvm/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/../clang/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/build/tools/lldb/source -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -MF tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o.d -o tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -c /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_arm_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:415:7: error: expected primary-expression before ‘}’ token
  415 |       }
      |       ^
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_arm64_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:536:7: error: expected primary-expression before ‘}’ token
  536 |       }
      |       ^
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_riscv32_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu-dwarf5/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:672:7: error: expected primary-expression before ‘}’ token
  672 |       }
      |       ^
124.601 [527/7/4810] Building CXX object tools/llvm-dwarfutil/CMakeFiles/llvm-dwarfutil.dir/llvm-dwarfutil.cpp.o
124.609 [527/6/4811] Building CXX object tools/llvm-dwarfutil/CMakeFiles/llvm-dwarfutil.dir/DebugInfoLinker.cpp.o
124.674 [527/5/4812] Linking CXX executable bin/llvm-dis
124.683 [527/4/4813] Linking CXX executable bin/llvm-diff
124.968 [527/3/4814] Linking CXX executable bin/llvm-dwarfdump
125.352 [527/2/4815] Building LLDB Python wrapper
125.360 [527/1/4816] Linking CXX executable bin/lldb-instr
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 2, 2025

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building lldb,llvm at step 4 "build".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/25869

Here is the relevant piece of the build log for the reference
Step 4 (build) failure: build (failure)
...
479.997 [1030/72/5681] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/NativeRegisterContextLinux_s390x.cpp.o
479.998 [1029/72/5682] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/NativeRegisterContextLinux_riscv64.cpp.o
480.042 [1028/72/5683] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTSource.cpp.o
480.209 [1027/72/5684] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/CF.cpp.o
480.222 [1026/72/5685] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ASTResultSynthesizer.cpp.o
480.320 [1025/72/5686] Building CXX object tools/lldb/source/Plugins/ObjectFile/Minidump/CMakeFiles/lldbPluginObjectFileMinidump.dir/ObjectFileMinidump.cpp.o
480.355 [1024/72/5687] Building CXX object tools/lldb/source/Plugins/ObjectFile/Placeholder/CMakeFiles/lldbPluginObjectFilePlaceholder.dir/ObjectFilePlaceholder.cpp.o
480.456 [1023/72/5688] Building CXX object tools/lldb/source/Plugins/ObjectFile/PECOFF/CMakeFiles/lldbPluginObjectFilePECOFF.dir/WindowsMiniDump.cpp.o
480.662 [1022/72/5689] Building CXX object tools/lldb/source/Plugins/Language/CPlusPlus/CMakeFiles/lldbPluginCPlusPlusLanguage.dir/BlockPointer.cpp.o
480.818 [1021/72/5690] Building CXX object tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o
FAILED: tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o 
/usr/bin/clang++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/source/Plugins/ObjectFile/Mach-O -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/include -I/home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/include -I/home/worker/2.0.1/lldb-x86_64-debian/build/include -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/include -I/usr/include/python3.11 -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/llvm/../clang/include -I/home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/../clang/include -I/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source -I/home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb/source -isystem /usr/include/libxml2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-vla-extension -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -MF tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o.d -o tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -c /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:414:15: error: label at end of compound statement: expected statement
      default:
              ^
               ;
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:535:15: error: label at end of compound statement: expected statement
      default:
              ^
               ;
/home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:671:15: error: label at end of compound statement: expected statement
      default:
              ^
               ;
3 errors generated.
480.827 [1021/71/5691] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCClassDescriptorV2.cpp.o
480.886 [1021/70/5692] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangUserExpression.cpp.o
481.234 [1021/69/5693] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/IntelPTPerThreadProcessTrace.cpp.o
481.245 [1021/68/5694] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/IntelPTThreadTraceCollection.cpp.o
481.379 [1021/67/5695] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/NSIndexPath.cpp.o
481.459 [1021/66/5696] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/Cocoa.cpp.o
481.622 [1021/65/5697] Building CXX object tools/lldb/source/Plugins/ObjectFile/wasm/CMakeFiles/lldbPluginObjectFileWasm.dir/ObjectFileWasm.cpp.o
481.659 [1021/64/5698] Building CXX object tools/lldb/source/Plugins/Process/POSIX/CMakeFiles/lldbPluginProcessPOSIX.dir/ProcessPOSIXLog.cpp.o
481.678 [1021/63/5699] Building CXX object tools/lldb/source/Plugins/Process/POSIX/CMakeFiles/lldbPluginProcessPOSIX.dir/CrashReason.cpp.o
481.682 [1021/62/5700] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/IntelPTSingleBufferTrace.cpp.o
481.685 [1021/61/5701] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/Procfs.cpp.o
481.711 [1021/60/5702] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/ClangASTImporter.cpp.o
481.791 [1021/59/5703] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCRuntimeV1.cpp.o
481.904 [1021/58/5704] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/NSArray.cpp.o
482.026 [1021/57/5705] Building CXX object tools/lldb/source/Plugins/ExpressionParser/Clang/CMakeFiles/lldbPluginExpressionParserClang.dir/IRForTarget.cpp.o
482.215 [1021/56/5706] Building CXX object tools/lldb/source/Plugins/ObjectFile/XCOFF/CMakeFiles/lldbPluginObjectFileXCOFF.dir/ObjectFileXCOFF.cpp.o
482.220 [1021/55/5707] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/ObjCLanguage.cpp.o
482.275 [1021/54/5708] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/CMakeFiles/lldbPluginGNUstepObjCRuntime.dir/GNUstepObjCRuntime.cpp.o
482.282 [1021/53/5709] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/NSException.cpp.o
482.356 [1021/52/5710] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/Perf.cpp.o
482.434 [1021/51/5711] Building CXX object tools/lldb/source/Plugins/Platform/Android/CMakeFiles/lldbPluginPlatformAndroid.dir/PlatformAndroidRemoteGDBServer.cpp.o
482.448 [1021/50/5712] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformDarwinKernel.cpp.o
482.513 [1021/49/5713] Building CXX object tools/lldb/source/Plugins/Process/Linux/CMakeFiles/lldbPluginProcessLinux.dir/IntelPTMultiCoreTrace.cpp.o
482.550 [1021/48/5714] Building CXX object tools/lldb/source/Plugins/Language/ObjC/CMakeFiles/lldbPluginObjCLanguage.dir/NSSet.cpp.o

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 2, 2025

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-ubuntu running on as-builder-9 while building lldb,llvm at step 7 "build-default".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/195/builds/11272

Here is the relevant piece of the build log for the reference
Step 7 (build-default) failure: cmake (failure)
...
18.930 [891/12/4586] Linking CXX static library lib/libLLVMObjCopy.a
18.950 [890/12/4587] Linking CXX static library lib/libLLVMDebugInfoDWARF.a
18.981 [889/12/4588] Linking CXX static library lib/libLLVMObjectYAML.a
19.004 [888/12/4589] Linking CXX static library lib/libLLVMLibDriver.a
19.009 [887/12/4590] Linking CXX static library lib/libLLVMJITLink.a
19.011 [886/12/4591] Linking CXX static library lib/libLLVMDebugInfoPDB.a
19.019 [885/12/4592] Linking CXX static library lib/libLLVMXRay.a
19.055 [884/12/4593] Linking CXX static library lib/liblldbHost.a
19.083 [883/12/4594] Linking CXX static library lib/libLLVMDebugInfoGSYM.a
19.088 [882/12/4595] Building CXX object tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o
FAILED: tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o 
ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/source/Plugins/ObjectFile/Mach-O -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/llvm/include -I/usr/include/python3.12 -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/llvm/../clang/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/../clang/include -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source -I/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb/source -D__OPTIMIZE__ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -MF tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o.d -o tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -c /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_arm_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:415:7: error: expected primary-expression before ‘}’ token
  415 |       }
      |       ^
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_arm64_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:536:7: error: expected primary-expression before ‘}’ token
  536 |       }
      |       ^
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_riscv32_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:672:7: error: expected primary-expression before ‘}’ token
  672 |       }
      |       ^
19.098 [882/11/4596] Linking CXX static library lib/libLLVMDWP.a
19.105 [882/10/4597] Linking CXX static library lib/libLLVMTextAPIBinaryReader.a
19.172 [882/9/4598] Linking CXX static library lib/libLLVMDebugInfoLogicalView.a
19.187 [882/8/4599] Linking CXX static library lib/liblldbPluginProtocolServerMCP.a
19.276 [882/7/4600] Linking CXX executable bin/llvm-cvtres
19.431 [882/6/4601] Building AArch64GenInstrInfo.inc...
19.512 [882/5/4602] Linking CXX executable bin/llvm-objcopy
19.518 [882/4/4603] Linking CXX executable bin/llvm-ifs
19.742 [882/3/4604] Linking CXX executable bin/llvm-pdbutil
24.784 [882/2/4605] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/AsmPrinter.cpp.o
27.102 [882/1/4606] Building CXX object lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 2, 2025

LLVM Buildbot has detected a new failure on builder publish-sphinx-docs running on as-worker-4 while building lldb,llvm at step 5 "build-docs-llvm-html-docs-clang-html-docs-clang...".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/45/builds/13922

Here is the relevant piece of the build log for the reference
Step 5 (build-docs-llvm-html-docs-clang-html-docs-clang...) failure: build (failure)
...
1580.272 [638/24/4825] Building CXX object tools/lldb/source/Plugins/ObjectFile/COFF/CMakeFiles/lldbPluginObjectFileCOFF.dir/ObjectFileCOFF.cpp.o
1580.644 [637/24/4826] Building CXX object tools/lldb/source/Plugins/ObjectFile/PECOFF/CMakeFiles/lldbPluginObjectFilePECOFF.dir/PECallFrameInfo.cpp.o
1581.540 [636/24/4827] Building CXX object tools/lldb/source/Plugins/ObjectFile/PDB/CMakeFiles/lldbPluginObjectFilePDB.dir/ObjectFilePDB.cpp.o
1581.837 [635/24/4828] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCTypeEncodingParser.cpp.o
1581.961 [634/24/4829] Building CXX object tools/lldb/source/Plugins/ObjectFile/Minidump/CMakeFiles/lldbPluginObjectFileMinidump.dir/ObjectFileMinidump.cpp.o
1582.242 [633/24/4830] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCTrampolineHandler.cpp.o
1582.311 [632/24/4831] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/GNUstepObjCRuntime/CMakeFiles/lldbPluginGNUstepObjCRuntime.dir/GNUstepObjCRuntime.cpp.o
1582.921 [631/24/4832] Building CXX object tools/lldb/source/Plugins/ObjectFile/PECOFF/CMakeFiles/lldbPluginObjectFilePECOFF.dir/WindowsMiniDump.cpp.o
1583.073 [630/24/4833] Building CXX object tools/lldb/source/Plugins/Platform/Android/CMakeFiles/lldbPluginPlatformAndroid.dir/AdbClient.cpp.o
1583.308 [629/24/4834] Building CXX object tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o
FAILED: tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o 
/usr/bin/c++ -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/source/Plugins/ObjectFile/Mach-O -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/llvm/include -I/usr/include/python3.8 -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/llvm/../clang/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/../clang/include -I/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source -I/home/buildbot/as-worker-4/publish-sphinx-docs/build/tools/lldb/source -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -std=c++17 -MD -MT tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -MF tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o.d -o tools/lldb/source/Plugins/ObjectFile/Mach-O/CMakeFiles/lldbPluginObjectFileMachO.dir/ObjectFileMachO.cpp.o -c /home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_arm_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:415:7: error: expected primary-expression before ‘}’ token
  415 |       }
      |       ^
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_arm64_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:536:7: error: expected primary-expression before ‘}’ token
  536 |       }
      |       ^
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp: In member function ‘void RegisterContextDarwin_riscv32_Mach::SetRegisterDataFrom_LC_THREAD(const lldb_private::DataExtractor&)’:
/home/buildbot/as-worker-4/publish-sphinx-docs/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp:672:7: error: expected primary-expression before ‘}’ token
  672 |       }
      |       ^
1583.881 [629/23/4835] Building CXX object tools/lldb/source/Plugins/ObjectFile/Placeholder/CMakeFiles/lldbPluginObjectFilePlaceholder.dir/ObjectFilePlaceholder.cpp.o
1585.129 [629/22/4836] Building CXX object tools/lldb/source/Plugins/ObjectFile/Minidump/CMakeFiles/lldbPluginObjectFileMinidump.dir/MinidumpFileBuilder.cpp.o
1585.706 [629/21/4837] Building CXX object tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeFiles/lldbPluginAppleObjCRuntime.dir/AppleObjCRuntimeV2.cpp.o
1586.261 [629/20/4838] Building CXX object tools/lldb/source/Plugins/ObjectFile/wasm/CMakeFiles/lldbPluginObjectFileWasm.dir/ObjectFileWasm.cpp.o
1586.482 [629/19/4839] Building CXX object tools/lldb/source/Plugins/ObjectFile/XCOFF/CMakeFiles/lldbPluginObjectFileXCOFF.dir/ObjectFileXCOFF.cpp.o
1586.916 [629/18/4840] Building CXX object tools/lldb/source/Plugins/ObjectFile/PECOFF/CMakeFiles/lldbPluginObjectFilePECOFF.dir/ObjectFilePECOFF.cpp.o
1587.321 [629/17/4841] Building CXX object tools/lldb/source/Plugins/Platform/Android/CMakeFiles/lldbPluginPlatformAndroid.dir/PlatformAndroidRemoteGDBServer.cpp.o
1588.278 [629/16/4842] Building CXX object tools/lldb/source/Plugins/OperatingSystem/Python/CMakeFiles/lldbPluginOperatingSystemPython.dir/OperatingSystemPython.cpp.o
1588.845 [629/15/4843] Building CXX object tools/lldb/source/Plugins/ObjectFile/ELF/CMakeFiles/lldbPluginObjectFileELF.dir/ObjectFileELF.cpp.o
1589.600 [629/14/4844] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformDarwinKernel.cpp.o
1590.572 [629/13/4845] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformDarwinDevice.cpp.o
1590.972 [629/12/4846] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformRemoteAppleBridge.cpp.o
1591.101 [629/11/4847] Building CXX object tools/lldb/source/Plugins/Platform/gdb-server/CMakeFiles/lldbPluginPlatformGDB.dir/PlatformRemoteGDBServer.cpp.o
1591.184 [629/10/4848] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformRemoteAppleWatch.cpp.o
1591.219 [629/9/4849] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformMacOSX.cpp.o
1591.367 [629/8/4850] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformRemoteAppleTV.cpp.o
1591.821 [629/7/4851] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformRemoteAppleXR.cpp.o
1593.034 [629/6/4852] Building CXX object tools/lldb/source/Plugins/Platform/AIX/CMakeFiles/lldbPluginPlatformAIX.dir/PlatformAIX.cpp.o
1594.628 [629/5/4853] Building CXX object tools/lldb/source/Plugins/Platform/FreeBSD/CMakeFiles/lldbPluginPlatformFreeBSD.dir/PlatformFreeBSD.cpp.o
1594.747 [629/4/4854] Building CXX object tools/lldb/source/Plugins/Platform/Android/CMakeFiles/lldbPluginPlatformAndroid.dir/PlatformAndroid.cpp.o
1596.032 [629/3/4855] Building CXX object tools/lldb/source/Plugins/Platform/Linux/CMakeFiles/lldbPluginPlatformLinux.dir/PlatformLinux.cpp.o
1600.123 [629/2/4856] Building CXX object tools/lldb/source/Plugins/Platform/MacOSX/CMakeFiles/lldbPluginPlatformMacOSX.dir/PlatformDarwin.cpp.o
1604.356 [629/1/4857] Building CXX object tools/lldb/source/Plugins/Instruction/RISCV/CMakeFiles/lldbPluginInstructionRISCV.dir/EmulateInstructionRISCV.cpp.o
ninja: build stopped: subcommand failed.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 2, 2025

LLVM Buildbot has detected a new failure on builder clang-s390x-linux-lnt running on systemz-1 while building lldb,llvm at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/136/builds/4455

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'libFuzzer-s390x-default-Linux :: fuzzer-timeout.test' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/./bin/clang    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/lib/fuzzer  /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/test/fuzzer/TimeoutTest.cpp -o /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/runtimes/runtimes-bins/compiler-rt/test/fuzzer/S390XDefaultLinuxConfig/Output/fuzzer-timeout.test.tmp-TimeoutTest # RUN: at line 1
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/lib/fuzzer /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/test/fuzzer/TimeoutTest.cpp -o /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/runtimes/runtimes-bins/compiler-rt/test/fuzzer/S390XDefaultLinuxConfig/Output/fuzzer-timeout.test.tmp-TimeoutTest
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/./bin/clang    -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta   --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/lib/fuzzer  /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/test/fuzzer/TimeoutEmptyTest.cpp -o /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/runtimes/runtimes-bins/compiler-rt/test/fuzzer/S390XDefaultLinuxConfig/Output/fuzzer-timeout.test.tmp-TimeoutEmptyTest # RUN: at line 2
+ /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/./bin/clang -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta --driver-mode=g++ -O2 -gline-tables-only -fsanitize=address,fuzzer -I/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/lib/fuzzer /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/test/fuzzer/TimeoutEmptyTest.cpp -o /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/runtimes/runtimes-bins/compiler-rt/test/fuzzer/S390XDefaultLinuxConfig/Output/fuzzer-timeout.test.tmp-TimeoutEmptyTest
not  /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/runtimes/runtimes-bins/compiler-rt/test/fuzzer/S390XDefaultLinuxConfig/Output/fuzzer-timeout.test.tmp-TimeoutTest -timeout=1 2>&1 | FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/test/fuzzer/fuzzer-timeout.test --check-prefix=TimeoutTest # RUN: at line 3
+ not /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/stage1/runtimes/runtimes-bins/compiler-rt/test/fuzzer/S390XDefaultLinuxConfig/Output/fuzzer-timeout.test.tmp-TimeoutTest -timeout=1
+ FileCheck /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/test/fuzzer/fuzzer-timeout.test --check-prefix=TimeoutTest
/home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/test/fuzzer/fuzzer-timeout.test:7:14: error: TimeoutTest: expected string not found in input
TimeoutTest: #0
             ^
<stdin>:26:44: note: scanning from here
==3508984== ERROR: libFuzzer: timeout after 1 seconds
                                           ^
<stdin>:31:104: note: possible intended match here
AddressSanitizer: CHECK failed: asan_report.cpp:227 "((current_error_.kind)) == ((kErrorKindInvalid))" (0x1, 0x0) (tid=3508984)
                                                                                                       ^

Input file: <stdin>
Check file: /home/uweigand/sandbox/buildbot/clang-s390x-linux-lnt/llvm/compiler-rt/test/fuzzer/fuzzer-timeout.test

-dump-input=help explains the following input dump.

Input was:
<<<<<<
           .
           .
           .
          21: MS: 1 ChangeByte-; base unit: 0c1bc52c50016933679b0980ccff3680e5831162 
          22: 0x48,0x69,0x21, 
          23: Hi! 
          24: artifact_prefix='./'; Test unit written to ./timeout-c0a0ad26a634840c67a210fefdda76577b03a111 
          25: Base64: SGkh 
          26: ==3508984== ERROR: libFuzzer: timeout after 1 seconds 
check:7'0                                                X~~~~~~~~~~ error: no match found
          27: AddressSanitizer:DEADLYSIGNAL 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          28: ================================================================= 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          29: AddressSanitizer:DEADLYSIGNAL 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          30: ================================================================= 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          31: AddressSanitizer: CHECK failed: asan_report.cpp:227 "((current_error_.kind)) == ((kErrorKindInvalid))" (0x1, 0x0) (tid=3508984) 
check:7'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:7'1                                                                                                            ?                         possible intended match
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Jul 2, 2025

LLVM Buildbot has detected a new failure on builder clang-arm64-windows-msvc running on linaro-armv8-windows-msvc-04 while building lldb,llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/161/builds/6829

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
...
UNSUPPORTED: mlgo-utils :: corpus/extract_ir_test.py (84369 of 84379)
UNSUPPORTED: mlgo-utils :: corpus/make_corpus_script.test (84370 of 84379)
UNSUPPORTED: mlgo-utils :: corpus/make_corpus_test.py (84371 of 84379)
UNSUPPORTED: mlgo-utils :: pytype.test (84372 of 84379)
PASS: lld :: MachO/x86-64-stubs.s (84373 of 84379)
PASS: lld :: MachO/zippered.yaml (84374 of 84379)
PASS: lld :: MachO/weak-reference.s (84375 of 84379)
PASS: lld :: MinGW/lib.test (84376 of 84379)
PASS: lld :: MachO/weak-definition-direct-fetch.s (84377 of 84379)
PASS: lld :: MinGW/driver.test (84378 of 84379)
command timed out: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
program finished with exit code 1
elapsedTime=4005.849282

@labath
Copy link
Collaborator

labath commented Jul 8, 2025

Sorry for going off-topic, but what does this say about the support for i386-apple-* as a whole? I find the prospect of dropping that exciting, as I believe that is the only target where eh_ and debug_frame register numbers are different.

I think we can remove i386-macos support, short of booting a seven year old OS on a machine at least that old, and who knows if everything in C++17 we use is even supported by the compilers back then. I know there are sometimes open source people trying to build & use a modern lldb on older configurations, but I think this would be a tough one to have working at this point. I wouldn't feel bad about any patches removing this support. I'll try to start removing these things as I have time/see an opportunity.

Apple announced that the macOS version being released in a few months (macOS 26) would be the final version that supports Intel machines at all. We'll have a business requirement to keep the 64-bit Intel support for another release cycle or so after that. What open source contributors might be using the llvm.org sources on is a different question, but the entire target support is going to go away before much longer I think.

Got it. Thanks for clarifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants